import request from "@/utils/request";
import defaultSettings from "@/settings";

export const apiUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseQuery/HvpsAndBepsBusinessDetailQuery/search`,
  exportUrl: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseQuery/HvpsAndBepsBusinessDetailQuery/search`,
  delUrl: `${defaultSettings.ctx.cnapsApp} `,
};

export function listConfig(params) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseQuery/HvpsAndBepsBusinessDetailQuery/search`,
    method: "post",
    data: params,
  });
}

export function detail(params) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseQuery/HvpsAndBepsBusinessDetailQuery/detail`,
    method: "get",
    params,
  });
}

export function addTxn(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseEntry/HvpsCustomerCreditTransferEntry/save`,
    method: "post",
    data,
  });
}

export function updTxn(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/HvpsBepsCreditModify/save111`,
    method: "post",
    data,
  });
}

export function delTxn(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/HvpsBepsCreditModify/delete`,
    method: "post",
    data,
  });
}

//大小额基本业务-大小额贷记业务修改-详情
export function hvpsBepsCreditModifyDetail(params) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/HvpsBepsCreditModify/detail`,
    method: "get",
    params,
  });
}
//大小额基本业务-小额客户发起普通贷记业务录入-提交
export function save121(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseEntry/BepsCustomerOrdinaryEntry/save`,
    method: "post",
    data,
  });
}

export function upd121(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/HvpsBepsCreditModify/save121`,
    method: "post",
    data,
  });
}

//大小额基本业务-小额定期贷记业务报文录入-提交
export function save125(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseEntry/BepsFixedCreditEntry/save`,
    method: "post",
    data,
  });
}

export function upd125(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/HvpsBepsCreditModify/save125`,
    method: "post",
    data,
  });
}


//大小额基本业务-小额定期借记业务录入-提交
export function save133(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseEntry/BepsFixedDebitEntry/save`,
    method: "post",
    data,
  });
}


//大小额基本业务-小额借记业务修改-详情
export function bepsDebitBusinessModifyDetail(params) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/BepsDebitBusinessModify/detail`,
    method: "get",
    params,
  });
}


//大小额基本业务-小额借记业务修改提交
export function update133(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/BepsDebitBusinessModify/save133`,
    method: "post",
    data,
  });
}

//大小额基本业务-小额借记业务修改提交
export function update127(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/BepsDebitBusinessModify/save127`,
    method: "post",
    data,
  });
}



//小额普通借记业务录入
//大小额基本业务-小额借记业务修改提交
export function add127(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseEntry/BepsOrdinaryDebitEntry/save`,
    method: "post",
    data,
  });
}

//小额金融机构发起普通贷记业务录入
export function bepsFinancialOrdinaryEntry(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseEntry/BepsFinancialOrdinaryEntry/save`,
    method: "post",
    data,
  });
}

//小额金融机构发起普通贷记业务修改
export function bepsFinancialOrdinaryUpd(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/HvpsBepsCreditModify/save122`,
    method: "post",
    data,
  });
}


//小额普通借记业务修改查询记录
export const apiUrlConfig104 = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/BepsDebitBusinessModify/B104tab`,
};

export const apiUrlConfig307 = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/BepsDebitBusinessModify/B307tab`,
};

export const apiUrlConfigEndorserTab = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/hvpsBepsPayment/hvpsBepsBase/baseModify/BepsDebitBusinessModify/endorserTab`,
};
